<?php
	/*this class define final var*/

	// database
	define("HOST", "localhost:3306", true);
	define("USER", "root", true);
	define("PASS", "root", true);
	define("CORPORATION", "corporation",true);
	
	// newest -- movie table
	define("NEWEST_MOVIE", "newest_movie", true);
	define("MOVIE_ID", "id", true);
	define("NEWEST_MOVIE_AREA", "newest_movie_area", true);
	define("NEWEST_MOVIE_SCORE", "newest_movie_score", true);
	// movie table column
	define("NEWEST_MOVIE_DATE", "newest_movie_date", true);
	define("NEWEST_MOVIE_TYPE", "newest_movie_type", true);
	define("MOVIE_IMG", "newest_movie_sea_pic", true);
	// movie newest tag
	define("NEWEST_MOVIE_TAG", 1101, true);
	
	/* movie details page begin */
	define("MOVIE_DETAILS_TABLE", "newest_movie_resume", true);
	define("MOVIE_RESUME_ID", "movie_id", true);
	define("MOVIE_RESUME_SYNOPSIS", "movie_resume_synopsis", true);
	define("SEA_PICTURES", "movie_resume_imgs", "true");
	define("MIDDLE_MOVIE_TABLE", "middle_newest_movie", true);
	define("IS_COLLECTION", "middle_movie_is_collection", true);
	define("MOVIE_CAST", "movie_resume_cast", true);
	define("RESUME_MOVIE_ID", "movie_id", true);
	define("MOVIE_DETAIL", 1102, true);
	/* movie details page end*/
	
	/* user table begin*/
	define("USER_TABLE", "user_table", true);
	define("USER_ID", "id", true);
	define("USER_HEADER", "user_header", true);
	define("USER_NAME", "user_name", true);
	/* user table end*/
	
	/*middle movie resume being*/
	define("MIDDLE_NEWEST_MOVIE", "middle_newest_movie", true);
	define("MIDDLE_MOVIE_ID", "middle_movie_id", true);
	define("PRAISE_OR_SCAN", "middle_movie_praise_or_scan", true);
	define("MIDDLE_USER_ID", "middle_user_id", true);
	define("NEWEST_MOVIE_COMMON", "middle_movie_common", true);
	define("NEWEST_MOVIE_COMMON_TIME", "middle_movie_common_time", true);
	
	define("MOVIE_DETAIL_INFOS", 1103, true);
	
	define("MOVIE_DETAILS_COMMONS", 1104, true);
	
	function linkMySql() {
		$conn = mysqli_connect(HOST, USER, PASS, CORPORATION) or die("cant connection mysql database");
		if($conn){
			mysqli_select_db($conn, CORPORATION);
		}
		return $conn;
	}
?>